package com.tinem.platform.service.message.observable;

import com.tinem.platform.module.pojo.vo.link.AddRes;
import com.tinem.platform.module.pojo.vo.message.PushReq;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springframework.context.ApplicationEvent;

import java.util.ArrayList;
import java.util.List;

/**
 * @author fzh
 * @version v1
 * @program: platform
 * @className MessageObservable
 * @description TODO
 * @site 
 * @company 
 * @create 2020-09-28 17:53
 */
@Data
@EqualsAndHashCode(callSuper=false)
public class MessageObservable extends ApplicationEvent {
    String id;
    Object body;
    String clientId;
    List<AddRes> links = new ArrayList();
    /**
     * Create a new ApplicationEvent.
     *
     * @param source the object on which the event initially occurred (never {@code null})
     */
    public MessageObservable(PushReq source, String clientId, String id, Object body) {
        super(source);
        this.clientId = clientId;
        this.id = id;
        this.body = body;
    }


    @Override
    public PushReq getSource() {
        return (PushReq) super.getSource();
    }

}
